#pragma strict

var walk_speed:float;

private var in_elevator:boolean;

function Start () {
	in_elevator = false;	
}

function Update () {
	var player_input_enabled:boolean = SceneManager.Instance().IsPlayerInputEnabled();

	var horizontal_speed:float = walk_speed;	
	
	var horizontal_movement:float = 0;
	
	if (!SceneManager.Instance().IsGameOver()) {
	
		if (player_input_enabled) {
		
			if (Input.GetButton("Left")) {		
				horizontal_movement = -1;
			}
			else if (Input.GetButton("Right")) {
				horizontal_movement = 1;
			}
			else horizontal_movement = 0;
		
			rigidbody.velocity.x = horizontal_speed * horizontal_movement;	
		}
	}
	else {	
		rigidbody.velocity.x = 0;
	}		
}

